Create a separate virtual disk for the data, and explain how to mount it on the virtual machine.
Understand when and why the file
/etc/bash_completion.d/grub appears in the folder
/etc/bash_completion.d/. This config file creates warnings
(see https://askubuntu.com/questions/778439/have-command-not-found),
and I don’t need it since grub is not installed.
Share folder on host computer. Answer mail from Fernando Hayashi Sant Anna fhsantanna@yahoo.com.br about folder sharing not working because cannot install the virtualbox guest additions package.
Before starting the installation process, we recommend to download the following files
Virtualbox: https://www.virtualbox.org/wiki/Downloads
Ubuntu Desktop: current Ubuntu release is 24.04, but the installation procedure works on earlier versions (maybe some slight modifications)
Ubuntu releases can be found here : http://releases.ubuntu.com/releases/
Note:
for the Macintosh computers with an Apple Silicon
processor (M1/M2/M3), you absolutely need to download the
“arm” version of the Ubuntu installation disk image.
ubuntu-24.04.3-desktop-arm64.iso
for other computers, the “amd” install disk is
fine: ubuntu-24.04.3-desktop-arm64.iso
The latest release tested was this one
RSAT has also been installed on VirtualBpx VMs with following releases
Open VirtualBox
In the Machine menu, select the New function.
Parameters
Name and Operating System (replace YYYY-MM by the curent year and month)
Uncheck the option “Proceed with unattended installation”
Memory size: 2048 Mb (this can be modified afterwards).
Processors: select it based on the number of cores of your computer and the inteded use of the VM.
Virtual Hard Disk: activate Create a virtual hard drive now.
Disk Size: 25Gb
At this stage, the VM has been created and needs to be configured before installing the operating system.
Before configuring the virtual machine, we need to tell VirtualBox how it will enable your local virtual machines to interact with their host (the operating system of the machine on which the VM is running).
In the File menu, select Tools > Network
Select Host-only Networks manager tab
Click on the Create button (“+” icon).
This creates a network named Hostnetwork
Select this network, click on the Properties button (toothed wheel icon), and check that the options correspond to this:
Adapter tab
VirtualBox enables you to specify several adapters, each corresponding to one separate network acces (e.g. using an ethernet card + wi-fi connection). Note that you will have the possibility to modify the network settings later.
VirtualBox offers alternative ways to configure network communications between the virtual machine, the host machine, and the external network. To get more information about network settings:
We present here one possible way to configure your Virtual machine, but this should be adapted to the particular security/flexibility requirements of the network where the maching has to run.
By default, we open a network adaptor of type NAT. This allows to establish connections - from your VM (browser, ssh) to the world outside the host machine (your computer) - from your computer to the VM
click on the tab Adapter 2,
check Enable Network Adapter
Attached to: NAT
In the topleft corner of the Settings window, click “Expert” to display the advanced configuration options for your NAT.
In the NAT “expert”configuration panel, click the Port forwarding button, and enter the following parameters
Leave the other fields blank.
This will enable you to establish ssh connection from your host computer to the VM via the port 2222.
To access the web server running inside the virtual machine from your host computer, we also need to forward the HTTP port.
In the Port forwarding window, add a second rule with the following parameters:
Leave the other fields blank.
This configuration allows you to access the web server running inside the VM by opening the following URL in a browser on your host machine:
http://localhost:8080
The request sent to port 8080 on the host computer is transparently forwarded to port 80 of the virtual machine, where the Apache web server is listening.
Note: Port 80 is often already in use on the host system. Using port 8080 avoids conflicts while remaining a common convention for local web services.
Once the settings have been specified, you can click on the Start icon (big fluo green array in VirtualBox).
A dialog box may appear “Please select a virtual optic disk …”. Click on the small folder icon and locate the disk image of Ubuntu that was downloaded in a previous step. Then click the Start button.
Ubuntu is now starting from the installation disk. The next section explains how to configure it.
The desktop version of Ubuntu presents the advantage of letting users work directly in the graphical environment of the Ubuntu virtual machine, which is convenient to open non-text result files for visualization (web pages, images) and to analyze the results in other graphical packages (R, openOffice, CytoScape, …).
NOTE CLAVIER FRANÇAIS: for the French Macintosh keyboard, I spent a lot of time to find the solution to use the 3-component keys (e.g. alt-shit-L for the pipe character |). The simplest solution: use the alt key on the RIGHT side of the space bar.
Dialog box Preparing to install Ubuntu.
Installation type:
In the dialog box Write the changes to disk? click Continue.
Where are you?
If you VM has a suitable Internet connexion, your location should be detected automatically. If not, choose the right location.
| Field | Value |
|---|---|
| Your name | RSAT admin |
| Your computer’s name | rsat-vb-YYYY-MM |
| Pick a username | rsat |
| Password | tochng2 |
| Log in automatically | I activate it because this will greatly facilitate the use of the Destkop version |
| Click Continue |
Ubuntu now installs the system, this should take a few minutes3.
After installation, Ubuntu displays a message “Installation is complete. You need to restart …”. Click Restart now.
When rebooting, Ubuntu warns you that you need to remove the installation medium and close the tray. In our case, the installation media is the iso disk. To remove it, go in the menu Devices -> Optical Drives -> Remove Disk from Optical Drive. If this does not work, close the window with the virtual machine, and restart this virtual machine from VirtualBox.
After reboot, you will automatically log in as RSAT admin user.
For the sake of convenience, I disactivate the lock screen and password prompt options. Indeed, since the VM is running under my account on the hosting system, there is no need to double the security options. For this, click on the Settings icon (toothed wheels) on the top-right corner of the Ubuntu display. Select All Settings and click on the panell Brightness and Lock. Set Lock to off and uncheck Require my password when waking from suspend.
For the desktop version of Ubuntu, it is convenient to enable copy-paste between the guest and the host.
So far the virtual machine does not support remote access. To add
support for ssh access, we need to install the appropriate
package.
## Install network and ssh tools
sudo apt-get install --quiet --assume-yes net-tools
sudo apt-get install --quiet --assume-yes ssh
sudo apt-get install --quiet --assume-yes openssh-server
## Test if the ssh is active
sudo systemctl status ssh
## If NOT active, you can activate it as follows
sudo systemctl enable ssh --now
sudo systemctl status ssh # check that is is active
ssh -p 2222 rsat@localhost
Notes:
The IP address above may be different on your computer, depending
on the network settings of your VirtualBox and on the number of Virtual
Machines currently running. If the address 192.168.56.101
does not work, you can obtain the IP address by typing
ip -c a in a terminal on your virtual machine.
I personnally find it convenient to establish an ssh connection to the VM, in order to perform the subsequent installation steps from a terminal on my own operating system, but the next installation steps can as well be performed from the terminal in the Virtual Machine’s graphical environment.
It is useful to install some VirtualBox accompanying software on your Ubuntu virtual machine.
sudo apt-get install --assume-yes --quiet virtualbox-guest-additions-iso
Note: this package is no longer valid with the Apple M1/M2/M3 processors (ARM).
VBoxManage list runningvms
VBoxManage list runningvms | awk -F"[{}]" '{print $2}'
For convenience, we store the IP of the machine of interest in an environment variable VMID.
VMID=`VBoxManage list runningvms | awk -F"[{}]" '{print $2}'`
Get properties of the VM
VBoxManage guestproperty enumerate ${VMID}
List information about a given virtual machine
VBoxManage showvminfo ${VMID}
Note: that command returns the MAC address, but no IP address.
VBoxManage showvminfo ${VMID} | grep '^NIC'
We create two separate users:
Both users (vmuser and rsat) have an initial password provided with the distribution (tochng), but which must be changed at the first login.
################################################################
## Create a user for the virtual machine
##
## This VM user is separate from the rsat user, which only serves to
## manage the RSAT software suite and related packages.
##
## For the sake of security, we force this user to change password at
## first login
## First delete this user (in case it was previously defined)
## sudo userdel --remove vmuser
sudo useradd --password `openssl passwd -1 -salt xyz tochng`\
--home /home/vmuser \
--create-home \
--shell /bin/bash \
--comment "VM user" \
vmuser
## Force vmuser to change password at first login
sudo chage -d 0 vmuser
## Force rsat user to change password at first login
sudo usermod --password `openssl passwd -1 -salt xyz tochng` rsat
sudo chage -d 0 rsat
## Add sudoer rights to vmuser and rsat users
sudo more /etc/sudoers
sudo chmod 644 /etc/sudoers
sudo nano /etc/sudoers
## Find the following line
## # User privilege specification
## root ALL=(ALL:ALL) ALL
## Below it, add the following line:
## rsat ALL=(ALL:ALL) ALL
## vmuser ALL=(ALL:ALL) ALL
## Type "Ctrl-X" to exit from the nano editor, then "Y" to save your changes.
The instructions to install Ubuntu packages are found in the file
INSTALL.md at the root of the RSAT folder.
Ethernet: optimize solution for a simple setting in the classroom.
Problem of disk occupancy: Ubuntu shared memory occupies 2Gb. This can be modified as explained here.
http://www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html
For the desktop version, I should try to use the Advanced installation in order to use less disk without loosing too much confort. For example, I could inactivate the support for all the languages that are installed by default (downloading language packs).
## Set up time zone, date and time (source:
## https://help.ubuntu.com/community/UbuntuTime).
TO BE WRITTEN
Once the Virtual Machine is working fine, it can be exported to an appliance.
Shut down the Virtual Machine if it has not been done yet.
In VirtualBox, open “File -> Export Appliance …”, and select the VM.
| Parameter | Value |
|---|---|
| Name | rsat-vb-YYYY-MM |
| Product | Regulatory Sequences Analysis Tools |
| Product-URL | http://rsat.eu/ |
| Vendor | Jacques van Helden |
| Vendor URL | http://jacques.van-helden.perso.luminy.univ-amu.fr/ |
| Version | YYYY-MM |
| Description | Regulatory Sequence Analysis Tools (RSAT, http://rsat.eu/), version YYYY-MM, installed on an Ubuntu 16.04 Virtual Machine. |
| License | Free of use for academic users, non-commercial and non-military usage. |
I have a French - French Macintosh, so I use it for installation, but I will later add an English keybord for the distribution.↩︎
This password is obviously not safe, but it will be changed at the end of the installation↩︎
Note if you did activate the option to update Ubuntu packages in the previous window, the installation can take several minutes↩︎